import request from '@/utils/request'
const baseApi = '/xmtsc-api'

// 沟通记录
export function getCommunicateList(data) {
  return request({
    url: baseApi + '/api/accountcompanymsg/list',
    method: 'get',
    params: data
  })
}

// 地区列表
export function areaList(data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=1',
    method: 'get',
    data: data
  })
}
// 地区列表树型
export function areaTreeList(data = {}) {
    return request({
        url: baseApi + '/api/syscode/findBaseData?data=area',
        method: 'get',
        data: data
    })
}
// 职位亮点
export function jobHighlightsList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=16',
    method: 'get',
    data: data
  })
}
//职位类别
export function jobCategoryList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=49',
    method: 'get',
    data: data
  })
}
//期望薪资
export function wantMoneyList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=6',
    method: 'get',
    data: data
  })
}
//企业规模
export function companyScaleList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=8',
    method: 'get',
    data: data
  })
}
//工作性质
export function workTypeList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=28',
    method: 'get',
    data: data
  })
}
//所属行业
export function belongsIndustryList (data = {}) {
  return request({
    url: baseApi + '/api/code/findSysCode?parentCode=22',
    method: 'get',
    params: data
  })
}
//所属行业2
export function belongsIndustryList2 (data = {}) {
    return request({
        url: baseApi + '/api/syscode/findBaseData?data=belongsIndustry',
        method: 'get',
        params: data
    })
}
//企业性质
export function companyNatureList (data = {}) {
  return request({
    url: baseApi + '/api/syscode/findBaseData?data=companyNature',
    method: 'get',
    data: data
  })
}
//学历
export function educationList (data = {}) {
    return request({
        url: baseApi + '/api/code/findSysCode?parentCode=29',
        method: 'get',
        data: data
    })
}
//工作经验
export function workExperienceList (data = {}) {
    return request({
        url: baseApi + '/api/code/findSysCode?parentCode=41',
        method: 'get',
        data: data
    })
}
//特长标签
export function specialtyTagList (data = {}) {
    return request({
        url: baseApi + '/api/code/findSysCode?parentCode=204',
        method: 'get',
        data: data
    })
}
//性别列表
export function sexList (data = {}) {
    return request({
        url: baseApi + '/api/code/findSysCode?parentCode=213',
        method: 'get',
        data: data
    })
}
//获取选项数据
export function findBaseData (data) {
  return request({
    url:'/xmtsc-api/api/syscode/findBaseData',
    method: 'get',
    params: data
  })
}
//上传文件
export function filesAnon (data) {
  return request({
    url:'/api-file/files-anon',
    method: 'POST',
    data: data
  })
}
//招人才，获取所有简历
export function findAllResumes (data) {
  return request({
    url: baseApi+'/api/resume/findAllResumes',
    method: 'POST',
    data: data
  })
}
//收藏职位
export function addPositionCollection (data) {
  return request({
    url: baseApi+'/api/employmentPosition/addPositionCollection',
    method: 'POST',
    data: data
  })
}
//收藏简历
export function addCompanyResume (data) {
    return request({
        url: baseApi+'/api/companyResume/addCompanyResume',
        method: 'POST',
        data: data
    })
}
//轮播图
export function bannerList (data) {
    return request({
        url: baseApi+ '/api/infomation/findBannerList',
        method: 'get',
        params: data
    })
}
//获取企业列表，首页入驻企业
export function companyList (data) {
    return request({
        url: baseApi+ '/api/company/findList',
        method: 'POST',
        data: data
    })
}
export function usersAnon (id) {
    return request({
        url: baseApi+ '/api/api-user/users-anon/' + id,
        method: 'GET',
    })
}
export function buildMsgRoom (data) {
    return request({
        url: baseApi+ '/api/accountcompanymsg/buildMsgRoom',
        method: 'POST',
        data: data
    })
}
export function chatList (data) {
    return request({
        url: baseApi+ '/api/accountcompanymsg/detail',
        method: 'GET',
        params: data
    })
}
export function sendMsg (data) {
    return request({
        url: baseApi+ '/api/accountcompanymsg/sendMsg',
        method: 'POST',
        data: data
    })
}
export function chatsList (data) {
  return request({
      url: baseApi+ '/api/accountcompanymsg/list',
      method: 'GET',
      params: data
  })
}
